﻿<%@ Page Language="C#" MasterPageFile="~/Danser.Master" AutoEventWireup="true" CodeBehind="UploadNewDataNew.aspx.cs" Inherits="Danser_AJAXEnabledWebApplication.UploadNewDataNew" Title="Danser - Upload New Data" %>

<%@ Register src="User Controls/MultiSelectList.ascx" tagname="MultiSelectList" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript" type="text/javascript" >
    
    function confirmCancelWindow()
    {
        var response = window.confirm("All files in list will not be uploaded to system.\nAre you sure you want to cancel?");
        if (response)
            return true;
        else
            return false;
    }
</script>

<style type="text/css">
    .style5
    {
        width: 143px;
    }
    .style6
    {
        width: 236px;
    }
</style>
</asp:Content>

<asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder1">
    <asp:Panel ID="mainPanel" runat="server" Height="100%" Width="900px">
    <asp:ScriptManager ID="ScriptManager" runat="server">
    </asp:ScriptManager>
    <table width="100%">
        <tr>
            <td colspan="2">
                <asp:Label ID="titleLabel" runat="server" CssClass="StandardLabel" 
                    Text="Upload New Test Files:"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">
                <table style="width:100%;">
                    <tr>
                        <td class="style5">
                            <asp:Label ID="selectFileLabel" runat="server" CssClass="StandardLabel" 
                                Text="Select an Excel file:" Width="144px"></asp:Label>
                        </td>
                        <td class="style6">
                            <asp:FileUpload ID="FileUpload" runat="server" />
                        </td>
                        <td align="left">
                            <asp:Button ID="addFilesButton" runat="server" CssClass="StandardButton" 
                                OnClick="addRow_click" Text="Add" ToolTip="Add file to upload list" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" CssClass="StandardLabel" 
                    Text="Select validation templates:"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td valign="middle" colspan="2">
                <asp:UpdatePanel ID="selectValidationsUpdatePanel" runat="server">
                    <ContentTemplate>
                        
                        <uc1:MultiSelectList ID="multiSelectList" runat="server" />
                        
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td valign="top" colspan="2">
                <asp:Label ID="filesListLabel" runat="server" CssClass="StandardLabel" 
                    Text="Files to upload:"></asp:Label>
                <asp:Panel ID="uploadingFilesPanel" runat="server" Visible="False" Width="100%">
                    <table style="width:100%;">
                        <tr>
                            <td width="20">
                                <asp:Image ID="waitImage" runat="server" ImageUrl="~/Resourses/Images/info.bmp" 
                                    Visible="true" />
                            </td>
                            <td>
                                <asp:Label ID="waitLabel" runat="server" Font-Bold="False" Font-Names="Arial" 
                                    Font-Size="10pt" ForeColor="Black" Text="Please wait while executing..." 
                                    Visible="true"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="2" valign="top">
                <asp:UpdatePanel ID="filesUpdatePanel" runat="server">
                    <ContentTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <asp:GridView ID="filesGridView" runat="server" AllowPaging="True" 
                                        BorderColor="White" BorderStyle="Solid" BorderWidth="1px" 
                                        EmptyDataText="&lt; No Files Selected &gt;" 
                                        onpageindexchanging="filesGridView_PageIndexChanging" 
                                        onrowdatabound="filesGridView_RowDataBound" 
                                        style="border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" 
                                        Width="100%">
                                        <RowStyle BackColor="LightGray" BorderColor="White" BorderStyle="Solid" 
                                            BorderWidth="1px" Font-Names="Arial" HorizontalAlign="Center" 
                                            VerticalAlign="Middle" CssClass="StandardRowStyle" />
                                        <PagerStyle BackColor="#C0C0FF" BorderColor="White" BorderStyle="Solid" 
                                            BorderWidth="1px" Font-Bold="True" Font-Names="Arial" 
                                            Font-Size="12pt" ForeColor="MidnightBlue" HorizontalAlign="Left" 
                                            VerticalAlign="Middle" />
                                        <HeaderStyle BackColor="#C0C0FF" BorderColor="White" BorderStyle="Solid" 
                                            BorderWidth="1px" Font-Bold="True" Font-Names="Arial" 
                                            Font-Size="12pt" ForeColor="MidnightBlue" HorizontalAlign="Center" 
                                            VerticalAlign="Middle" />
                                        <AlternatingRowStyle BackColor="Gainsboro" BorderColor="White" 
                                            BorderStyle="Solid" BorderWidth="1px" Wrap="True" 
                                            CssClass="StandardRowStyle" />
                                        <EmptyDataRowStyle BackColor="LightGray" BorderColor="White" 
                                            BorderStyle="Solid" BorderWidth="1px" Font-Italic="True" 
                                            Font-Names="Arial" Font-Size="12pt" HorizontalAlign="Center" 
                                            VerticalAlign="Middle" />
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Panel ID="uploadPanel" runat="server" Height="29px" Visible="False" 
                                        Width="201px">
                                        <table align="center" style="width:100%;">
                                            <tr>
                                                <td align="center" valign="middle">
                                                    <asp:Button ID="uploadButton" runat="server" CssClass="StandardButton" 
                                                        OnClick="uploadButton_Click" Text="Upload" />
                                                </td>
                                                <td align="center" valign="middle">
                                                    <asp:Button ID="cancelButton" runat="server" CssClass="StandardButton" 
                                                        OnClick="cancelButton_Click" OnClientClick="return confirmCancelWindow()" 
                                                        Text="Cancel" />
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Panel>
        
        

</asp:Content>


